The present invention relates to a method of assisting execution of a plurality of numerical simulation programs for simulating physical phenomena on a computer so that the programs are executed in cooperation with each other.
Recently, a parallel computer system has become commercially available in which a plurality of processing units (hereinafter also referred to as PUs) are interconnected by way of a high-speed network to be operated simultaneously for enhanced throughput. A region to be simulated is appropriately divided into partial regions, in such a way that each PU has one partial region assigned, thereby effectively exploiting the most of the high processing speed of the parallel computer system.
Parallel computer systems are largely classified into two groups by the method of accessing the memory space from each PU. One group is of shared memory type in which all PUs can access the entire memory space. The other group is of distributed memory type in which each PU can access only a memory space accompanied therewith. Since numerical simulation aims principally at solving large-scale problems by raising computational speeds, use of a parallel computer system of a distributed-memory type is under study.
In a parallel computer system in which a region to be simulated is divided into plural portions and those portions are allocated to a plurality of Pus, exchange of data between the PUs is required during simulation. The data to be exchanged includes results of computation of a physical quantity and the like. For example, a computed value of a physical quantity at a grid point located on the border of a partial region is used for computing a value of the physical quantity at a grid point near the boundary in an adjacent partial region. With a distributed-memory parallel computer system, transfer of data between the PUs must all be described in a program. Data is transferred between the PUs in terms of a message. A program for a parallel computer system must explicitly describe an instruction such that data generated by own PU is transmitted to another PU on generation of the data, in case the data is one required by the another PU, and data held by another PU is received by own PU at a timing when own PU actually uses the data, in case the data is one required by own PU. Many parallel computer systems prepare a group of functions each called a communications library (or subroutines) for supporting the transfer of messages between the PUs. The communication can be described as a function call from C or FORTRAN programs for example. Several communications libraries are implemented across different parallel computer system hardware to provide communications environment as de facto standard. Examples are the PVM (Parallel Virtual Machine) developed by Oak Ridge National Laboratory of US and the MPI (Message Passing Interface) that is under standardization involving many organizations. The parallel programs with calls to these communications libraries are high in possibility (portability) that they can be recompiled on different parallel computer systems for operation.
In executing a simulation program by a plurality of PUs, a plurality of processes for performing simulation of partial regions are executed by the plurality of PUs. In the PVM, a process being executed on each PU is provided with process identification data (PID) that is unique in the PVM. Each of messages transferred between PUs is composed of main data, the PID, and a message ID (MID) that the user can assign to the message. Therefore, creating parallel programs each of which executes communication based on the PID and MID determined appropriately by the user enables transfer messages between PUs without interference.
A communications library such as the PVM can be implemented on a plurality of workstations interconnected by a network, in addition to parallel computer systems, thereby providing a virtual parallel computer system environment. In operating communications libraries on multiple, different hardware systems, internal data representation may differ from one hardware system to another. That is, if a plurality of workstations interconnected by a network use different central processing units (CPUs) and operating systems (OSs), data types such as integer number and real number in a same program may differ in internal bit representation between the workstations. Therefore, to allow the user of a communications library to make communication without being aware of the details of data representation, the communications libraries such as the PVM provide a capability of automatically converting data representations inside the libraries as required. Providing a PVM process with an appropriate data converting capability allows a message coming from a user process to be converted appropriately and the resultant message to be sent to a destination process. In such a constitution, the differences between OSs and between CPUs are absorbed by the PVM processes, so the user programs are highly independent of the OSs and CPUs.
It should be noted that, when a simulation region of one simulation program is divided into partial simulation regions and simulation processings for them are executed by a plurality of processors concurrently, the mesh density of each partial region may differ from that of an adjacent partial region. According to Japanese Laid-Open Patent Publication No. 4-336369, a technology is disclosed which reflect physical quantities calculated at discrete points on the boundary between of a partial region onto the simulation of an adjacent partial region. That is, a circuit is provided for converting the calculated physical quantities to values at the discrete points on the boundary, belonging to the adjacent partial region and data obtained by this circuit is transferred to an adjacent processor. Actually, the number of boundaries and contour data are entered from both input and output units to create a conversion matrix by the arithmetic unit and the above-mentioned conversion is performed based on the conversion matrix.
Numerical simulation aims at obtaining the distribution of a physical quantity concerned. Numerical simulation is largely divided into two groups by method of representation physical quantity. One is simulations of continuous system and the other is simulations of particle system.
In continuous-system simulation, a physical quantity to be obtained is expressed by f and a space is expressed by a coordinate (x, y) (or (x, y, z) for a three-dimensional space) and the problem comes to solve an equation that f(x, y) satisfies. For example, Maxwell's equations for electromagnetic field description and Navier-Stokes equations for fluid field description are known as the equations of this type. Normally, these equations take a form of partial differential equation; therefore, except for very simple cases, no solution can be obtained analytically. Consequently, an approximate solution is numerically obtained for each problem by means of a computer. To numerically express the distribution of f(x, y) in the computer, a concept of functional discretization is introduced. Discretization denotes an operation for approximately representing, in the finite number of numerical values, an originally continuous function.
An example of the mesh is one obtained by dividing the (x, y) space by a plurality of straight lines orthogonally intersecting each other into a grid. This grid is also referred to as an orthogonal grid. In this case, grid lines are straight lines and intersecting each other orthogonally. In a more general situation, the grid lines may be curved. A technique for obtaining the value of physical quantity at the grid lines in the mesh is referred to as finite differential method.
In another mesh example, a mesh has an arbitrary shape composed of a trilateral or a quadrilateral. This type is called an unstructured grid. A typical technique for obtaining the value of physical quantity in a region divided into an unstructured grid includes finite element method. In this method, a grid point is referred to as a node and a trilateral or a quadrilateral is referred to as an element.
A special example of continuous-system simulation is also known in which, instead of using a mesh, f is expressed as a linear combination of known simple functions (for example, triangular functions). In this case, a discrete value corresponding to the function value at a mesh point is considered as a value of a coefficient for each function.
The grid points of a structured grid or an unstructured grid are positions where physical quantities are calculated, and are generally referred to as discrete points. A set of discrete points is referred to as a base or a simulation base. A set of grid points to which the simulation by finite differential method or finite element method is applied is sometimes referred to as a differential base or a finite element base. If one simulation program is executed on a parallel computer system as a plurality of simulation processes that handle different partial simulation regions, a group of discrete points belonging to each partial simulation region handled by each simulation process is referred to as the base of that simulation process.
In a particle-system simulation, a physical quantity is represented as motions of particles distributed in space. Each particle may correspond to a physical entity such as an atom in a materials simulation or a star in an astronomical simulation, and a problem to be used is described by use of the first principle of physics such as equation of motion. To save computational time, a technique is sometimes used in which a group of particles are represented by a single virtual particle. The position of each particle is described by coordinates (x(t),y(t),z(t)) and their time differentials with time t being an independent variable. Therefore, an equation to be mainly solved by a particle-system simulation is an ordinary differential equation. In this case too, it is difficult to obtain an analytical solution for a system having particles more than several particles; solving a problem having a realistic scale requires to resort to a numerical solving method assisted by a computer. It should be noted that in the particle-system simulation, a set of particles provides the base of simulation.
A continuous-system simulation and a particle-system simulation may be considered that both represent the same physical phenomenon in terms of different scales. While the particle-system simulation pays attention to a microscopic motion of each component of a physical phenomenon, the continuos-system simulation grasps the same phenomenon more macroscopically to understand to a statistical behavior. The same physical phenomenon can sometimes be solved by both methods. Often, however, these two methods are used complementarily according to the size and scale of problems to be handled.
To correctly analyze a physical phenomenon which is complex and industrially interesting, it is desired to perform coupled simulation such as simulation that considers a coupling effect of a plurality of physical phenomena occurring concurrently or simulation that combines different paradigms such as the particle system and the continuous system. For example, in designing a fluid related machine, it is possible that an analysis of a flow pattern of fluid by particle-system simulation and an analysis of vibration caused by the flow pattern by continuous-system simulation be performed simultaneously.
Conventionally, when it becomes necessary to analyze a plurality of physical phenomena or combine different simulation techniques, one of the following approaches has been selected.
(1) A plurality of user programs corresponding to respective simulation are obtained, rewritten and integrated into a coupled simulation program.
(2) Two simulation programs are executed alternately to exchange data between the programs without integrating them into one program.
If the two simulation programs are no t integrated, it is necessary to send a computational result data by one program to another program for a partial region at which simulation regions of these programs overlap. In an actual known method, the output of one simulation program is once stored in a file or the like and the format of the stored data is converted to the input format of the other simulation program as required. These operations are repeated to attain the same effect as that of coupled simulation.
If the simulation programs A and B are executed separately without integrating them into one program, data obtained as a result of the execution of the simulation program A cannot be reading used by the simulation program B because these programs have different bases. That is, the result data of the simulation program A are data defined on the base of the program A. So the data needs to be converted to one defined on the base of the simulation program B. This data conversion is executed based on a positional relationship between the coordinates of a group of discrete points constituting the base of the other simulation program and the coordinates of a group of discrete points constituting the base of own simulation program.